package com.myframe.www.net;

import com.google.gson.Gson;
import com.yong.android.framework.utils.log.SLog;

import okhttp3.MediaType;
import okhttp3.RequestBody;

/**
 * Description:
 * Created by Andy Hong on 10/19/2017.
 */

public class ParamFactory {
    private static Gson gson;

    static {
        gson = new Gson();
    }

    public static RequestBody generationParamBody(Object param) {
        String json = gson.toJson(param);
        SLog.d("json param: " + json);
        return RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
    }

}
